﻿using Centa.Agency.Application.Entity;
using Centa.Agency.Application.Interface;
using Centa.Agency.Factory.Unity;
using Centa.Agency.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Centa.Agency.Application.Service
{
    public class UserInfoAppService : IUserInfoAppService
    {
        //IUserInfoRepository repository = RepositoryFactory.CreateUserInfoAppService();
        public readonly IUserInfoRepository repository;
        public UserInfoAppService(IUserInfoRepository _repository)
        {
            repository = _repository;
        }
      
        public int AddUserInfo(UserInfo entity)
        {
            return repository.AddUserInfo(entity);
        }

        public int DelUserInfo(UserInfo entity)
        {
            return repository.DelUserInfo(entity);
        }

        public int DelUserInfo(int id)
        {
            return repository.DelUserInfo(id);
        }

        public int EditeUserInfo(UserInfo entity)
        {
            return repository.EditeUserInfo(entity);
        }

        public IEnumerable<UserInfo> GetUserInfoData()
        {
            return repository.GetUserInfoData();
        }

        
    }
}
